package com.seecen.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.seecen.common.BaseResponse;
import com.seecen.common.ResultUtils;
import com.seecen.mapper.ServiceMapper;
import com.seecen.pojo.entity.ServiceEntity;
import com.seecen.service.ServiceService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 小辛
* @description 针对表【allmaster_service(服务表)】的数据库操作Service实现
* @createDate 2025-10-17 15:51:18
*/
@Service
public class ServiceServiceImpl extends ServiceImpl<ServiceMapper, ServiceEntity>
    implements ServiceService{

    @Resource
    private  ServiceMapper serviceMapper;
    @Override
    public BaseResponse<List<ServiceEntity>> getServices() {
        List<ServiceEntity> services = serviceMapper.selectList(null);
        return ResultUtils.success(services);
    }

    @Override
    public boolean addImage(ServiceEntity serviceEntity) {
        int insert = serviceMapper.insert(serviceEntity);
        if(insert==1){
            return true;
        }
        return false;
    }
}




